<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUsedcarsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('usedcars', function (Blueprint $table) {
            $table->increments('id');  //二手车表
            $table->integer('pid')->comment('图片ID');
            $table->char('carseries', 32)->comment('车系');
            $table->char('carmodel', 32)->comment('车型');           
            $table->char('carconf', 32)->comment('配置');
            $table->integer('year')->comment('年份');
            $table->integer('price')->comment('价格');
            $table->char('color', 10)->comment('颜色');
            $table->boolean('operation')->comment('是否运营');
            $table->date('registertime')->comment('上牌时间');
            $table->integer('mileage')->comment('行驶里程');
            $table->date('checktime')->comment('年检到期');
            $table->date('insurance')->comment('强险到期');
            $table->char('discharge', 10)->comment('排放');
            $table->char('gearbox', 10)->comment('变速箱');
            $table->char('gestype', 10)->comment('燃油类型');
            $table->boolean('approve')->comment('是否奥迪认证');
            $table->boolean('guarantee')->comment('有无质保');
            $table->boolean('finance')->comment('有无金融政策');
            $table->text('summary')->comment('汽车描述');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('usedcars');
    }
}
